claude: Preserve custom IDs in panel-tabset tabs and add hash navigation#13639
Draft
gordonwoodhull wants to merge 1 commit intomainfrom
Draft
claude: Preserve custom IDs in panel-tabset tabs and add hash navigation#13639gordonwoodhull wants to merge 1 commit intomainfrom
gordonwoodhull wants to merge 1 commit intomainfrom
Conversation
Fixes #3416 Extends the panel-tabset custom node system to preserve user-specified IDs from markdown headers (e.g., ## Tab Title {#my-id}) through the entire rendering pipeline, enabling anchor-based navigation to specific tabs. Custom Node Changes (panel-tabset.lua): - Modified quarto.Tab constructor to accept and store identifier parameter - Updated parse_tabset_contents to pass el.attr.identifier to quarto.Tab - Modified render_quarto_tab to use tbl.identifier in header attributes - Extended custom node metaobject system to store and expose identifiers array - Updated render_tabset to use custom IDs with validation: * Warns on duplicate IDs and falls back to auto-generated IDs * Warns on conflicts with tabset- prefix pattern * Logs final ID used for each tab Bootstrap Tab Navigation (quarto-html-after-body.ejs): - Added activateTabFromHash() to activate tabs from URL hash on page load - Added hashchange listener for anchor link navigation - Added click handler to reliably activate tabs even when hash is already set - Scrolls to show entire tabset container (.panel-tabset) on activation This enables users to write [Link](#my-tab-id) to navigate to and activate specific tabs within panel-tabsets, with the custom ID flowing from markdown through the Lua filter system to the final HTML output. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a vibe-coded bugfix for #3416
As such, I'll submit as draft. As I commented in the issue:
claude's summary
Extends the panel-tabset custom node system to preserve user-specified IDs from markdown headers (e.g., ## Tab Title {#my-id}) through the entire rendering pipeline, enabling anchor-based navigation to specific tabs.
Custom Node Changes (panel-tabset.lua):
Bootstrap Tab Navigation (quarto-html-after-body.ejs):
This enables users to write Link to navigate to and activate specific tabs within panel-tabsets, with the custom ID flowing from markdown through the Lua filter system to the final HTML output.
🤖 Generated with Claude Code